/*
 * Copyright 2008 Neil Bacon
 * Distributed under the terms of the Mozilla Public License version 1.1
 * or the GNU General Public License version 3.
 */

package nb.ref;

import java.lang.ref.ReferenceQueue;

/**
 * Produce ValueReference<V, K> instances.
 * User doesn't need to know whether they are based on Soft or Weak References.
 * @param <K> type of key
 * @param <V> type of value
 */
public interface ValueReferenceFactory<K, V> {

    ValueReference<K, V> get(K key, V value, ReferenceQueue<? super V> queue);

}
